package leader.print;

import java.util.List;

import leader.tool.JTableDefine;
import teacher.bean.Award;
import teacher.bean.Teacher;
import tools.StringDate;

public class TeacherPrint {
	public void printTeacher(List<Teacher> lists){
		System.out.println(lists.size());
		String[][] columnNames = new String[lists.size()+1][7];		
		columnNames[0] = new String[]{"编号","姓名","工号","职务","学位","邮箱","研究方向"};
		for(int i=1;i<lists.size();i++) {
			Teacher teacher = lists.get(i);
			columnNames[i][0] = String.valueOf(i);
			columnNames[i][1] = teacher.getName();
			columnNames[i][2] = teacher.getUser();
			columnNames[i][3] = teacher.getDuty();
			columnNames[i][4] = String.valueOf(teacher.getDegree());
			columnNames[i][5] = teacher.getMail();
			columnNames[i][6] = teacher.getName();
		}
		int[] px = new int[]{40,120,105,50,50,80,80};
		JTableDefine d = new JTableDefine();
		d.printTable(columnNames,px);
		System.out.println("============================");
	}
}
